package com.tt.fashionWebSite.domain;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by isoft-work 5 on 11/19/14.
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "chi_tiet_dh")
@NamedQueries({
      @NamedQuery(name = "getOrderDetailCommon", query = "SELECT c FROM ChiTietDatHang c") ,
})
public class ChiTietDatHang implements Serializable {

    public static final String GET_ORDERDETAIL_ALL = "getOrderDetailCommon";

   @Id
   @Column(name = "MA_CT_DH")
   private String maDH;

   @ManyToOne
   @JoinColumn(name = "MA_DH")
   private DatHang datHang;

   @ManyToOne
   @JoinColumn(name = "MA_CT_SP")
   private ChiTietSanPham chiTietSanPham;

   @Column(name = "SO_LUONG")
   private Long soLuong;

   @Column(name = "TONG_GIA")
   private Double tongGia;

   public String getMaDH() {
      return maDH;
   }

   public void setMaDH(String maDH) {
      this.maDH = maDH;
   }

   public DatHang getDatHang() {
      return datHang;
   }

   public void setDatHang(DatHang datHang) {
      this.datHang = datHang;
   }

   public ChiTietSanPham getChiTietSanPham() {
      return chiTietSanPham;
   }

   public void setChiTietSanPham(ChiTietSanPham chiTietSanPham) {
      this.chiTietSanPham = chiTietSanPham;
   }

   public Long getSoLuong() {
      return soLuong;
   }

   public void setSoLuong(Long soLuong) {
      this.soLuong = soLuong;
   }

   public Double getTongGia() {
      return tongGia;
   }

   public void setTongGia(Double tongGia) {
      this.tongGia = tongGia;
   }
}
